/**
 * @module 预约类别组件 
 * @author Yun Tang 
 * @date 2020-05-23 17:44:53 
 */
import React from 'react';

interface IProps {
  type: string;
  subInfo: string;
  goNext: () => void;
}

const TypeItem: React.FC<IProps> = (props:IProps) => {
  const {type, subInfo, goNext} = props
  return (
    <section className="subType" onClick={goNext}>
      <div>
        <img src={require(`../imgs/icon-${type === '个人' ? 'person' : 'team'}.png`)} alt="" style={{width: type === '个人' ? 40 : 50}}/>
      </div>
      <article>
        <p>{type}</p>
        <p>{subInfo}</p>
      </article>
    </section>
  )
}

export default TypeItem;